package com.ohxwj.modules.web.task;

import com.ohxwj.modules.web.service.WebDayHitService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

/**
 * Created by Administrator on 2018-05-03.
 */
@Configuration
@EnableScheduling
public class DayHitTask {

    private Logger logger = LoggerFactory.getLogger(DayHitTask.class);

    @Autowired
    private WebDayHitService webDayHitService;

    @Scheduled(cron = "0 0 2 0/1 * ?")
    private void dayHitTasks() {
        logger.info("执行日常打点统计任务");
        webDayHitService.updateDayCnt();
    }
}
